package com.wiloon.java8x.json;

import org.junit.Test;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by wiloon on 11/26/14.
 */
public class JsonTestClass {
    @Test
    public void test() {
        JsonHelper jh = new JsonHelper();
//        Map map = new HashMap<Integer, MyValue>();
//        map.put(1, new MyValue().name = "abc");
//        map.put(2, new MyValue().name = "def");


        Map map = new HashMap();
        map.put("funName", "GetAndroidVersion");
        map.put("serialVersionUID", -4308869841788373801l);
        map.put("language", "zh");
        map.put("APPVersion", "1.1.1");
        map.put("funName", "GetAndroidVersion");
        map.put("funName", "GetAndroidVersion");
        map.put("funName", "GetAndroidVersion");
        map.put("funName", "GetAndroidVersion");

        jh.jacksonTest(map);
        jh.fastJsonTest(map);
        jh.gsonTest(map);
    }

    public class MyValue {
        public String name;
        public int age;
        // NOTE: if using getters/setters, can keep fields `protected` or `private`
    }
}
